package com.leonzhangxf.spel.beandefinition.annotation;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

/**
 * The demonstrate for Expression in BeanDefinition.
 *
 * @author leonzhangxf
 * @date 20190426
 */
@Configuration
@ComponentScan({"com.leonzhangxf.spel.beandefinition.annotation"})
public class ApplicationForExpressionInBeanDefinitionAnnotationStarter {

    public static void main(String[] args) {
        System.setProperty("user.region", "zh-CN");

        AnnotationConfigApplicationContext applicationContext =
            new AnnotationConfigApplicationContext(ApplicationForExpressionInBeanDefinitionAnnotationStarter.class);

        System.out.println(applicationContext.getBean(PropertyValueTestBean.class));
        System.out.println(applicationContext.getBean(SimpleMovieLister.class));
    }
}
